package com.itfreer.power.dao.useredit;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

import org.springframework.beans.BeanUtils;

import com.itfreer.form.api.JdbcBaseEntity;
import com.itfreer.power.entity.useredit.UserSysAuthoEntity;

@Entity(name = "sso_user_sys_autho")
public class JdbcUserSysAuthoEntity implements JdbcBaseEntity<UserSysAuthoEntity>, Serializable {

	private static final long serialVersionUID = 3065523210938752296L;

	/**
	 * id 唯一值
	 */
	@Id
	@Column(name = "s_id", length = 50, nullable = false)
	private String sysId;

	/**
	 * 用户id
	 */
	@Column(name = "s_userid", length = 50, nullable = true)
	private String userid;

	/**
	 * 系统id
	 */
	@Column(name = "s_registerserviceid", length = 50, nullable = true)
	private String registerServiceId;

	/**
	 * 授权类型
	 */
	@Column(name = "s_authorizationtype", length = 50, nullable = true)
	private String authorizationType;

	/**
	 * 是否处理
	 */
	@Column(name = "s_dealing", length = 50, nullable = true)
	private Double dealing;

	public String getSysId() {
		return sysId;
	}

	public void setSysId(String sysId) {
		this.sysId = sysId;
	}

	public String getUserid() {
		return userid;
	}

	public void setUserid(String userid) {
		this.userid = userid;
	}

	public String getRegisterServiceId() {
		return registerServiceId;
	}

	public void setRegisterServiceId(String registerServiceId) {
		this.registerServiceId = registerServiceId;
	}

	public String getAuthorizationType() {
		return authorizationType;
	}

	public void setAuthorizationType(String authorizationType) {
		this.authorizationType = authorizationType;
	}

	public Double getDealing() {
		return dealing;
	}

	public void setDealing(Double dealing) {
		this.dealing = dealing;
	}

	@Override
	public void setId(String arg0) {
		this.setSysId(arg0);

	}

	@Override
	public void from(UserSysAuthoEntity entity) {
		BeanUtils.copyProperties(entity, this);

	}

	@Override
	public UserSysAuthoEntity toEntity() {
		UserSysAuthoEntity entity = new UserSysAuthoEntity();
		BeanUtils.copyProperties(this, entity);
		return entity;
	}

}
